package com.example.demo.Schedule;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @ClassName ScheduleTest
 * @Description TODO
 * @Author hly
 * @Date 2018\11\29 0029 18:12
 */
@Slf4j
@Component
public class ScheduleTest {



    @Scheduled(cron = "0/5 0 0 * * ? ")
    public void corn(){
        System.out.println("执行corn的date是："+new Date(System.currentTimeMillis()));
    }
}
